import BasePlugin from "@/core/Frame/BaseClass/BasePlugin"
import RoamCommand from "./RoamCommand"
import AreaZoomInCommand from "./AreaZoomInCommand"
import AreaReductionCommand from "./AreaReductionCommand"
import RefreshCommand from "./RefreshCommand"
import ZoomOutCommand from "./ZoomOutCommand"
import ZoomInCommand from  "./ZoomInCommand"
import FullExtentCommand from "./FullExtentCommand"
import RegionLockCommand from "./RegionLockCommand"

class MapToolsPlugin extends BasePlugin {
  constructor() {
    super()
  }

  // 注册命令
  registerCommands() {
    this.addCommand(RoamCommand);
    this.addCommand(AreaZoomInCommand);
    this.addCommand(AreaReductionCommand);
    this.addCommand(RefreshCommand);
    this.addCommand(ZoomOutCommand);
    this.addCommand(ZoomInCommand);
    this.addCommand(FullExtentCommand);
    this.addCommand(RegionLockCommand);
  }

  // 订阅事件
  registerEvents() {
    // this.subscribeEvent('RoamEvent')
    // this.subscribeEvent('AreaZoomInEvent')
    // this.subscribeEvent('AreaReductionEvent')
    // this.subscribeEvent('RefreshCommand')
  }

  // 接收事件
  handleEvent(eventType: string, args: any) {
    // if (eventType === 'RoamEvent') {
    //   console.log('args',args)
    // }
  }
}

export default MapToolsPlugin

